package com.chee.plant.hibernate.object.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the equipment table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="equipment"
 */

public abstract class BaseEquipment  implements Serializable {

	public static String REF = "Equipment";
	public static String PROP_EQUIP_INTERVAL = "EquipInterval";
	public static String PROP_TYPE = "Type";
	public static String PROP_EQUIP_DEFENSE = "EquipDefense";
	public static String PROP_DROP_LEVEL = "DropLevel";
	public static String PROP_EQUIP_LIFE = "EquipLife";
	public static String PROP_EQUIP_LEVEL = "EquipLevel";
	public static String PROP_EQUIP_ATTACK = "EquipAttack";
	public static String PROP_NAME = "Name";
	public static String PROP_NPC_SELL = "NpcSell";
	public static String PROP_PRICE = "Price";
	public static String PROP_ID = "Id";
	public static String PROP_LEVEL = "Level";
	public static String PROP_DESC = "Desc";
	public static String PROP_DROP_RATE = "DropRate";


	// constructors
	public BaseEquipment () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseEquipment (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseEquipment (
		java.lang.Integer id,
		java.lang.String name,
		java.lang.String desc,
		java.lang.Integer type,
		java.lang.Integer level,
		java.lang.Integer npcSell,
		java.lang.Integer price,
		java.lang.Integer dropRate,
		java.lang.Integer dropLevel,
		java.lang.Integer equipLevel,
		java.lang.Integer equipInterval,
		java.lang.Integer equipAttack,
		java.lang.Integer equipDefense,
		java.lang.Integer equipLife) {

		this.setId(id);
		this.setName(name);
		this.setDesc(desc);
		this.setType(type);
		this.setLevel(level);
		this.setNpcSell(npcSell);
		this.setPrice(price);
		this.setDropRate(dropRate);
		this.setDropLevel(dropLevel);
		this.setEquipLevel(equipLevel);
		this.setEquipInterval(equipInterval);
		this.setEquipAttack(equipAttack);
		this.setEquipDefense(equipDefense);
		this.setEquipLife(equipLife);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String name;
	private java.lang.String desc;
	private java.lang.Integer type;
	private java.lang.Integer level;
	private java.lang.Integer npcSell;
	private java.lang.Integer price;
	private java.lang.Integer dropRate;
	private java.lang.Integer dropLevel;
	private java.lang.Integer equipLevel;
	private java.lang.Integer equipInterval;
	private java.lang.Integer equipAttack;
	private java.lang.Integer equipDefense;
	private java.lang.Integer equipLife;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="sequence"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: name
	 */
	public java.lang.String getName () {
		return name;
	}

	/**
	 * Set the value related to the column: name
	 * @param name the name value
	 */
	public void setName (java.lang.String name) {
		this.name = name;
	}



	/**
	 * Return the value associated with the column: desc
	 */
	public java.lang.String getDesc () {
		return desc;
	}

	/**
	 * Set the value related to the column: desc
	 * @param desc the desc value
	 */
	public void setDesc (java.lang.String desc) {
		this.desc = desc;
	}



	/**
	 * Return the value associated with the column: type
	 */
	public java.lang.Integer getType () {
		return type;
	}

	/**
	 * Set the value related to the column: type
	 * @param type the type value
	 */
	public void setType (java.lang.Integer type) {
		this.type = type;
	}



	/**
	 * Return the value associated with the column: level
	 */
	public java.lang.Integer getLevel () {
		return level;
	}

	/**
	 * Set the value related to the column: level
	 * @param level the level value
	 */
	public void setLevel (java.lang.Integer level) {
		this.level = level;
	}



	/**
	 * Return the value associated with the column: npc_sell
	 */
	public java.lang.Integer getNpcSell () {
		return npcSell;
	}

	/**
	 * Set the value related to the column: npc_sell
	 * @param npcSell the npc_sell value
	 */
	public void setNpcSell (java.lang.Integer npcSell) {
		this.npcSell = npcSell;
	}



	/**
	 * Return the value associated with the column: price
	 */
	public java.lang.Integer getPrice () {
		return price;
	}

	/**
	 * Set the value related to the column: price
	 * @param price the price value
	 */
	public void setPrice (java.lang.Integer price) {
		this.price = price;
	}



	/**
	 * Return the value associated with the column: drop_rate
	 */
	public java.lang.Integer getDropRate () {
		return dropRate;
	}

	/**
	 * Set the value related to the column: drop_rate
	 * @param dropRate the drop_rate value
	 */
	public void setDropRate (java.lang.Integer dropRate) {
		this.dropRate = dropRate;
	}



	/**
	 * Return the value associated with the column: drop_level
	 */
	public java.lang.Integer getDropLevel () {
		return dropLevel;
	}

	/**
	 * Set the value related to the column: drop_level
	 * @param dropLevel the drop_level value
	 */
	public void setDropLevel (java.lang.Integer dropLevel) {
		this.dropLevel = dropLevel;
	}



	/**
	 * Return the value associated with the column: equip_level
	 */
	public java.lang.Integer getEquipLevel () {
		return equipLevel;
	}

	/**
	 * Set the value related to the column: equip_level
	 * @param equipLevel the equip_level value
	 */
	public void setEquipLevel (java.lang.Integer equipLevel) {
		this.equipLevel = equipLevel;
	}



	/**
	 * Return the value associated with the column: equip_interval
	 */
	public java.lang.Integer getEquipInterval () {
		return equipInterval;
	}

	/**
	 * Set the value related to the column: equip_interval
	 * @param equipInterval the equip_interval value
	 */
	public void setEquipInterval (java.lang.Integer equipInterval) {
		this.equipInterval = equipInterval;
	}



	/**
	 * Return the value associated with the column: equip_attack
	 */
	public java.lang.Integer getEquipAttack () {
		return equipAttack;
	}

	/**
	 * Set the value related to the column: equip_attack
	 * @param equipAttack the equip_attack value
	 */
	public void setEquipAttack (java.lang.Integer equipAttack) {
		this.equipAttack = equipAttack;
	}



	/**
	 * Return the value associated with the column: equip_defense
	 */
	public java.lang.Integer getEquipDefense () {
		return equipDefense;
	}

	/**
	 * Set the value related to the column: equip_defense
	 * @param equipDefense the equip_defense value
	 */
	public void setEquipDefense (java.lang.Integer equipDefense) {
		this.equipDefense = equipDefense;
	}



	/**
	 * Return the value associated with the column: equip_life
	 */
	public java.lang.Integer getEquipLife () {
		return equipLife;
	}

	/**
	 * Set the value related to the column: equip_life
	 * @param equipLife the equip_life value
	 */
	public void setEquipLife (java.lang.Integer equipLife) {
		this.equipLife = equipLife;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.chee.plant.hibernate.object.Equipment)) return false;
		else {
			com.chee.plant.hibernate.object.Equipment equipment = (com.chee.plant.hibernate.object.Equipment) obj;
			if (null == this.getId() || null == equipment.getId()) return false;
			else return (this.getId().equals(equipment.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}

private static final long serialVersionUID = 1L; 
}